home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / bbsutil / gapctty.zip / GAPCTTY.TXT < prev   
Text File  |  1988-10-03  |  10KB  |  331 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.                                       GAPCTTY
  26.                                           
  27.                            Remote Communications Handler
  28.             
  29.                                   October 3, 1988
  30.                                           
  31.                                           
  32.                                           
  33.                    (C) Copyright 1988 The GAP Development Company
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.             GAPCTTY       (C) Copyright 1988 The GAP Development Company
  71.  
  72.  
  73.             GENERAL OVERVIEW
  74.             ----------------
  75.             
  76.             GAPCTTY is a replacement for the DOS CTTY function. However,
  77.             unlike the  CTTY function,  I/O is  not redirected.  It is a
  78.             terminate and  stay resident  (TSR) type of program and must
  79.             be turned on to use it and off to disable it.  Disabling the
  80.             program removes it from memory.
  81.             
  82.             GAPCTTY was  designed  to  be  utilized  by  Bulletin  Board
  83.             operators while  exiting to  DOS from  a remote location. It
  84.             may also be used whenever there is a need to invoke CTTY.
  85.             
  86.             This program   was written  out of necessity because of bugs
  87.             with the CTTY function in DOS 3.3 which can cause a computer
  88.             to "hang" if a remote user types a backspace or an ESC while
  89.             the cursor  is in column 0 of the local computer.  With some
  90.             computers (Compaq) this problem does not occur, but with the
  91.             majority of clones it is a real menace.
  92.             
  93.             GAPCTTY monitors  three interrupt  vectors :  DOS functions,
  94.             keyboard, and  communications port.  The communications port
  95.             is set  up to  provide input/output  at speeds  greater than
  96.             19,200 bps.   The  keyboard is  monitored to  determine if a
  97.             backspace was  pressed  on  the  local  keyboard  (yes,  the
  98.             backspace IS  a problem).  The DOS interrupt 21 is monitored
  99.             so that any local I/O can be sent to the remote terminal.
  100.             
  101.             The program monitors the carrier detect line and will reboot
  102.             the computer if there is a loss of carrier.
  103.             
  104.             
  105.             USAGE
  106.             -----
  107.             
  108.             To use  GAPCTTY you  must provide it with three command line
  109.             parameters :
  110.             
  111.               1 - Communication port (1 or 2)
  112.               2 - On/Off flag
  113.               3 - Ctrl-C checking (ON or Off)
  114.             
  115.             The communications port is either COM 1 or COM 2. The On/Off
  116.             flag tells the program to either install itself in memory or
  117.             remove itself  from memory.  The flag for Ctrl-C checking is
  118.             provided so  that you  may use  GAPCTTY in  conjunction with
  119.             programs that  do not  provide their  own communications I/O
  120.             and you  wish to  prevent a  user from  breaking out  of the
  121.             program (or  the batch  file that  runs the  program).   For
  122.             simple remote  exits to  DOS, you  would normally leave this
  123.             flag set to OFF.
  124.             
  125.             You must provide a valid com port number or the program will
  126.             simply exit back to DOS.
  127.  
  128.  
  129.  
  130.                                        Page 2
  131.  
  132.  
  133.  
  134.  
  135.  
  136.             GAPCTTY       (C) Copyright 1988 The GAP Development Company
  137.  
  138.  
  139.             
  140.             Some sample invocations would appear as follows :
  141.             
  142.               GAPCTTY 1 ON ON   - Invoke GAPCTTY for COM 1 and do not
  143.                                   allow a Ctrl-C from the remote
  144.                                   terminal.
  145.               GAPCTTY 1 ON OFF  - Invoke GAPCTTY for COM 1 but do allow
  146.                                   a Ctrl-C from the remote terminal.
  147.               GAPCTTY 1 OFF OFF - Reset interrupt vectors back to their
  148.                                   previous state and remove program from
  149.                                   memory.  The third parameter in this
  150.                                   case is irrelevant.
  151.             
  152.             Since most  BBS programs  implement their remote exit to DOS
  153.             by exiting to a batch file, a sample remote batch file might
  154.             look like this :
  155.             
  156.               echo off
  157.               cls
  158.               set prompt=Type EXIT To Return To GAP$_$p$_
  159.               gapctty 1 ON OFF
  160.               command
  161.               c:
  162.               cd \gap
  163.               gapctty 1 OFF OFF
  164.               set prompt=$p$_
  165.               gap
  166.             
  167.             It is  imperative that  you disable  GAPCTTY when  it is  no
  168.             longer needed.  This is the equivalent of issuing a CTTY CON
  169.             command to  DOS.   The program  must be disabled or when the
  170.             user  returns   to  your  BBS  he/she  will  receive  double
  171.             characters and  the display  will be  generally messy!    No
  172.             permanent harm  of course  will come but as soon as the user
  173.             logs off  and the  DTR line  is dropped,  your computer will
  174.             reboot!
  175.             
  176.             If you  run GAPCTTY when there is no remote connection, your
  177.             computer may reboot at an inopportune time (depending on how
  178.             "noisy" your  com port  is).  This is normal and is for your
  179.             protection.
  180.             
  181.             
  182.             QUIRKS
  183.             ------
  184.             
  185.             GAPCTTY will  work only with programs that use DOS for their
  186.             I/O.  Programs that directly write to the screen or use BIOS
  187.             services will  run just  fine on  the local computer but the
  188.             remote terminal will receive absolutely nothing!
  189.             
  190.             The backspace  problem with DOS 3.3 and CTTY is definately a
  191.             bazarr problem.   If  the backspace  were not  trapped,  the
  192.             remote user  would receive  a space  instead  of  an  actual
  193.  
  194.  
  195.  
  196.                                        Page 3
  197.  
  198.  
  199.  
  200.  
  201.  
  202.             GAPCTTY       (C) Copyright 1988 The GAP Development Company
  203.  
  204.  
  205.             backspace.   DOS sends  the space  and the  BIOS  takes  the
  206.             responsibility of  repositioning the cursor.  It was strange
  207.             to watch  the BIOS routines continuosly re-invoke themselves
  208.             through software interrupts.  No wonder DOS has bugs!
  209.             
  210.             Cursor positioning  commands generated thru the BIOS are not
  211.             supported (IE,  the CLS  command), however  ANSI codes  work
  212.             just fine.
  213.             
  214.             GAPCTTY fully expects the keyboard buffer to be where it was
  215.             when the  computer was turned on (the BIOS keyboard buffer).
  216.             The current version does not support keyboard enhancers that
  217.             provide for  buffers larger  than 16  bytes.    We  will  be
  218.             working on  this problem and will provide a new version when
  219.             a solution is found.
  220.             
  221.             The program uses the vector for interrupt 65h to store vital
  222.             information which  means that  you may  not  use  any  other
  223.             program that takes over this interrupt.
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.                                        Page 4
  263.  
  264.  
  265.  
  266.  
  267.  
  268.             GAPCTTY       (C) Copyright 1988 The GAP Development Company
  269.  
  270.  
  271.             LEGAL STUFF
  272.             -----------
  273.             
  274.             Individuals are  granted a  license to  use the accompanying
  275.             software freely:  copy it,  post it  on  computer  services,
  276.             distribute it  through software exchanges, etc.  However, no
  277.             fee must be charged other than the cost of duplication.
  278.             
  279.             The program may freely be distributed with other programs as
  280.             long as no charge is made for those "other" programs.
  281.             
  282.             No part  of